package derbyclnt;

import derbyclnt.sockets.*;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.shape.*;


def ea: EnableAssertion = EnableAssertion {};

var mgr:MainManager;
var engine:Engine = Engine{};

var mainStage = Stage { 
	title : "Derby"
	width: Config.SCREEN_WIDTH
    height: Config.SCREEN_HEIGHT
    resizable : false
    onClose : function () { java.lang.System.exit(0); }
        
    scene: Scene {
    	
        content: [ 
        	Text {
            	x: 25
            	y: 30
            	content : "Hooray!!"
             	font : Font { size: 32}
         	}
         	engine
    	]
    	
    }
}

function run(args : String[]) {
    mgr = new MainManager();
    engine.init(mgr);
    mgr.start();
    mainStage.visible = true;
}

